<?php  echo $this->session->flash();?>

<div class="file">
	<table width="100%" cellpadding="2" cellspacing="2" border="0">
		     <tr>
			<td>
				&nbsp
			</td>
		     </tr>
		     <?php
		     if(is_array($permissionArray) && count($permissionArray) > 0){
			foreach($permissionArray as $data){
					
					if($lang == "chi"){
						$moduleName = $data['SystemModule']['module_chinese'];
					}
					else{
						$moduleName = $data['SystemModule']['module'];
					}
					
					echo '<tr><td  align="left">';
					echo $this->Js->link($moduleName,array( 'controller' => 'users', 'action' => 'showmodulepermission',$data['SystemModule']['module_unique_name'],$roleId),array('update' =>'#permissionListDiv','indicator' => 'loaderID','class'=>'link_red','alt'=>__('SHOW_MODULE_LIST', true)),'');
					//echo $ajax->link($moduleName,array( 'controller' => 'system_modules', 'action' => 'showModulePermissionsForGroup',$data['SystemModule']['module_unique_name'],$usertypeId),array('update' =>'#permissionListDiv','indicator' => 'loaderID','class'=>'link','alt'=>__('SHOW_MODULE_LIST', true)),'');
					//echo $html->link($moduleName,"javascript:showModulePermissions('".$data['SystemModule']['module']."', '".$usertypeId."');",array("class"=>"individual_report",'title'=>__("VIEW_MODULES",true)));
					
					echo '</td></tr>';			    
   
			    
			}
		     }else{
			echo '<tr><td>No Records Found</td></tr>';
		     }
		     ?>
	 </table>
</div>
<!-- Div update starts here -->
<div id="permissionListDiv" class="data-list">

</div>
<!-- Div update ends here -->

<?php echo $this->Js->writeBuffer(); // Write cached scripts?>